﻿@model TGIApp.Model.TicketQuota
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>TicketQuota</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.TicketType)
        </div>
        @{ if (Model != null && Model.TicketType_Id != 0)
           { 
            <div class="editor-field">
                @Html.DropDownListFor(model => model.TicketType_Id, new SelectList(ViewBag.TicketTypesWithEventVenue, "Id", "ShowNameNClass", Model.TicketType_Id))
            </div>
           }
           else
           { 
            <div class="editor-field">
                @Html.DropDownListFor(model => model.TicketType_Id, new SelectList(ViewBag.TicketTypesWithEventVenue, "Id", "ShowNameNClass"))
            </div>
           }
        }
        <div class="editor-label">
            @Html.LabelFor(model => model.AgentBranch.Name)
        </div>
        @{ if (Model != null && Model.AgentBranch_Id != 0)
           { 
            <div class="editor-field">
                @Html.DropDownListFor(model => model.AgentBranch_Id, new SelectList(ViewBag.AgentBranches, "Id", "Name", Model.AgentBranch_Id))
            </div>
           }
           else
           { 
            <div class="editor-field">
                @Html.DropDownListFor(model => model.AgentBranch_Id, new SelectList(ViewBag.AgentBranches, "Id", "Name"))
            </div>
           }
        }
        <div class="editor-label">
            @Html.LabelFor(model => model.QuotaQuantity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.QuotaQuantity)
            @Html.ValidationMessageFor(model => model.QuotaQuantity)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
